package com.free.util.sysinit;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
 

public class StaticModel {
	private String s1="";
	private String s2="";
	private String s3 ="";
	private int c1 =0;
	private int c2=0;
	private int c3 = 0;
	public String getS1() {
		return s1;
	}
	public void setS1(String s1) {
		this.s1 = s1;
	}
	public String getS2() {
		return s2;
	}
	public void setS2(String s2) {
		this.s2 = s2;
	}
	public String getS3() {
		return s3;
	}
	public void setS3(String s3) {
		this.s3 = s3;
	}
	public int getC1() {
		return c1;
	}
	public void setC1(int c1) {
		this.c1 = c1;
	}
	public int getC2() {
		return c2;
	}
	public void setC2(int c2) {
		this.c2 = c2;
	}
	public int getC3() {
		return c3;
	}
	public void setC3(int c3) {
		this.c3 = c3;
	}
}
class StaticModelRowMapper implements RowMapper {

 
	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		StaticModel model = new StaticModel();
		 
		
		try{
			model.setS1(rs.getString("s1"));
			model.setS2(rs.getString("s2"));
			model.setS3(rs.getString("s3")); 
		}catch(Exception ex){
			
		}
		
		try{
			model.setC1(rs.getInt("c1"));
			model.setC2(rs.getInt("c2"));
			model.setC3(rs.getInt("c3")); 
		}catch(Exception ex){
			
		}
		
		
		return model;
	}
	
}
